<template>
  <div class="client">
    <van-nav-bar
        title="标题"
        left-text="返回"
        right-text="新增"
        left-arrow
        @click-left="onClickLeft"
    />
    <van-search :placeholder="placeholder"
                v-model="input"
                show-action
                action-text="搜索"
                shape="round"
    ></van-search>



    <custInfoCell v-for="item in custList"
                  :custName="item.custName"
                  :company="item.company"
                  :telephone="item.telephone"
                  :position="item.position"
    >

    </custInfoCell>

  </div>
</template>

<script>
import {GetCustInfoList} from "@/request/api";
import custInfoCell from "@/components/custInfoCell";

export default {
  data() {
    return {
      placeholder: "请输入",
      input: "",
      custList: []
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    }
  },
  created() {
    GetCustInfoList({
      current: "1",
      size: "5"
    }).then(res => {
      // console.log(res);
      this.custList = res.data.records;
    });
  },
  components: {
    custInfoCell
  }


}
</script>

<style scoped lang="less">
.client {
  font-size: 0.16rem;
  background-color: #cfcfcf;
}

///deep/ [role="button"] {
//  font-size: 18px;
//}


</style>